package com.woniu.smart.controller;

import com.woniu.smart.entity.RunState;
import com.woniu.smart.service.RunStateService;
import com.woniu.smart.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: smart
 * @description:
 * @author: qqq
 * @create: 2022-10-27 18:14
 **/
@RestController
@RequestMapping("runstates")
public class RunStateController {
    @Autowired
    private RunStateService runStateService;
    @GetMapping()
    public Result queryAll(){
        List<RunState> runStates = runStateService.selectAll();
        return Result.ok().data("runStates",runStates);
    }
}
